Skip to content

Update create tokens tool and README gif#13

Merged
jussi-sa merged 1 commit into
mainfrom
token-and-gif
Sep 3, 2025
Merged

Update create tokens tool and README gif#13
jussi-sa merged 1 commit into
mainfrom
token-and-gif

Conversation

@jussi-sa
Copy link
Copy Markdown
Contributor

@jussi-sa jussi-sa commented Sep 3, 2025

Description

This PR removes the ability to create secret tokens from the CreateTokenTool, simplifying the token creation interface to only support public tokens. The tool now exclusively creates public tokens with read-only scopes.

Core Functionality

  • Removed secret token creation: The CreateTokenTool now only creates public tokens (pk.*)
  • Simplified scope management:
    • Removed SECRET_SCOPES constant
    • Renamed PUBLIC_SCOPES to SCOPES
    • Only the following scopes are now supported:
      • styles:tiles
      • styles:read
      • fonts:read
      • datasets:read
      • vision:read

Code Modifications

  • CreateTokenTool.schema.ts: Removed all secret scope definitions and simplified the schema
  • CreateTokenTool.ts:
    • Updated tool description to specify "public access token"
    • Removed logic for detecting and handling secret scopes
    • Simplified logging messages
  • ListTokensTool.schema.ts: Updated usage filter to only accept 'pk' (removed 'sk' and 'tk' options)

Testing

image

Checklist

  • Code has been tested locally
  • Unit tests have been added or updated
  • Documentation has been updated if needed

Additional Notes

@jussi-sa jussi-sa requested a review from a team as a code owner September 3, 2025 17:36
@jussi-sa jussi-sa merged commit 5e9bcd3 into main Sep 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants